gtknotebook: Fix a potential NULL pointer dereference
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 20 Nov 2013 17:32:32 +0000 (17:32 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Mon, 9 Mar 2015 13:41:37 +0000 (13:41 +0000)
Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760

gtk/gtknotebook.c

index 3de4692cc15227863c2dcbd904224dfa9d155cd0..9217f12ec82b84ea83a016167d84bcfe4d6e6f79 100644 (file)
@@ -2637,7 +2637,7 @@ gtk_notebook_draw (GtkWidget *widget,
       }
     }
 
-  if (priv->operation == DRAG_OPERATION_REORDER &&
+  if (priv->cur_page && priv->operation == DRAG_OPERATION_REORDER &&
       gtk_cairo_should_draw_window (cr, priv->drag_window))
     {
       cairo_save (cr);